//Creator.java
package factoryMethod;

/**
 *@author:youtubezou
 *@version:2012-7-6
 */
public interface Creator {
	Product factory();
}

class ConcreteCreatorA implements Creator {
	public Product factory() {
		return new ConcreteProductA("ConcreteCreatorA.factory()");
	}
}

class ConcreteCreatorB implements Creator {
	public Product factory() {
		return new ConcreteProductB("ConcreteCreatorB.factory()");
	}
}